package com.wyf.android.advance.rvvp

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter

class RvvpViewPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(
    fm,
    BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
) {
    override fun getCount() = 2

    override fun getItem(position: Int): Fragment {
        return if (position == 0) RvvpFragment.newInstance() else RvvpDescFragment.newInstance()
    }
}